package com.irdstudio.efp.esb.api.rest.yed.req;

import com.alibaba.fastjson.annotation.JSONField;
import com.irdstudio.basic.framework.core.annotation.DicType;
import com.irdstudio.basic.framework.core.constant.SDicChannelType;
import com.irdstudio.efp.esb.api.common.GroupeInterface;
import com.irdstudio.efp.esb.api.common.GroupeInterface.yed;
import com.irdstudio.efp.esb.api.common.YedApplyBrwUsg;
import com.irdstudio.efp.esb.api.common.YedLoanTermEnum;
import com.irdstudio.efp.esb.common.constant.nls.*;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

public class YedApproveReqBean implements Serializable{

    /**证件类型 **/
    @JSONField(name = "IdentTp")
    @NotNull(groups = {yed.class})
    @NotEmpty(groups = {yed.class})
    @Length(max = 64, groups = {yed.class})
    private String IdentTp;

    /**证件号码 **/
    @JSONField(name = "IdentNo")
    @NotNull(groups = {yed.class})
    @NotEmpty(groups = {yed.class})
    @Length(max = 64, groups = {yed.class})
    private String IdentNo;

    /** 用信申请流水号 */
    @JSONField(name = "UseCrdtAppSrlNo")
    @NotNull(groups = {yed.class})
    @NotEmpty(groups = {yed.class})
    @Length(max = 64, groups = {yed.class})
    private String UseCrdtAppSrlNo;

    /** 授信申请流水号 */
    @JSONField(name = "CrAppSrlNo")
    @NotNull(groups = {yed.class})
    @NotEmpty(groups = {yed.class})
    @Length(max = 32, groups = {yed.class})
    private String CrAppSrlNo;

    /** 产品代码 */
    @JSONField(name = "PdCd")
    @NotNull(groups = {yed.class})
    @NotEmpty(groups = {yed.class})
    @Length(max = 11, groups = {yed.class})
    private String PdCd;

    /** 贷款产品名称 */
    @JSONField(name = "LoanPdNm")
    @NotNull(groups = {yed.class})
    @NotEmpty(groups = {yed.class})
    @Length(max = 200, groups = {yed.class})
    @DicType(dicType = NlsLoanProdNmEnum.class, method = "getValue", groups = {yed.class})
    private String LoanPdNm;

    /** 贷款金额 */
    @JSONField(name = "LoanAmt")
    @NotNull(groups = {yed.class})
    @Digits(integer = 21, fraction = 2, groups = {yed.class}, message = "LoanAmt 数字校验异常")
    private Double LoanAmt;

    /** 贷款期限 */
    @JSONField(name = "LoanTrm")
    @NotNull(groups = {yed.class})
    @NotEmpty(groups = {yed.class})
    @Length(max = 10, groups = {yed.class})
    @DicType(dicType = YedLoanTermEnum.class, method = "getValue", groups = {yed.class})
    private String LoanTrm;

    /** 贷款期限类型 */
    @JSONField(name = "LoanTrmTp")
    @NotNull(groups = {yed.class})
    @NotEmpty(groups = {yed.class})
    @Length(max = 2, groups = {yed.class})
    @DicType(dicType = YEDNlsTrmTypeEnum.class, method = "getValue", groups = {yed.class})
    private String LoanTrmTp;

    /** 贷款用途 */
    @JSONField(name = "LoanPps")
    @NotNull(groups = {yed.class})
    @NotEmpty(groups = {yed.class})
    @Length(max = 7, groups = {yed.class})
    @DicType(dicType = YedApplyBrwUsg.class, message = "贷款用途字典项校验失败", groups = {yed.class}, method = "getValue")
    private String LoanPps;

    /** 币种 */
    @JSONField(name = "Ccy")
    @NotNull(groups = {yed.class})
    @NotEmpty(groups = {yed.class})
    @DicType(dicType = CurrCdEnum.class, method = "getValue", groups = {yed.class})
    @Length(max = 3, groups = {yed.class})
    private String Ccy;

    /** 贷款利率 */
    @JSONField(name = "LoanIntRt")
    @NotNull(groups = {yed.class})
    @Digits(integer = 12, fraction = 7, groups = {yed.class}, message = "数字校验异常")
    private Double LoanIntRt;

    /** 贷款到期日 */
    @JSONField(name = "LoanMatureDt")
    @Length(max = 10, groups = {yed.class})
    private String LoanMatureDt;

    /** 贷款申请时间 */
    @JSONField(name = "LoanAppTm")
    @NotNull(groups = {yed.class})
    @NotEmpty(groups = {yed.class})
    @Length(max = 10, groups = {yed.class})
    private String LoanAppTm;

    /** 银行名称 */
    @JSONField(name = "BnkNm")
    @Length(max = 128, groups = {yed.class})
    @NotNull(groups = {yed.class})
    @NotEmpty(groups = {yed.class})
    private String BnkNm;

    /** 放款卡号 */
    @JSONField(name = "DistrCardNo")
    @Length(max = 32, groups = {yed.class})
    private String DistrCardNo;

    /** 还款卡号 */
    @JSONField(name = "RpymtCardNo")
    @Length(max = 32, groups = {yed.class})
    private String RpymtCardNo;

    /** 银行行号 */
    @JSONField(name = "BnkNo")
    @Length(max = 30, groups = {yed.class})
    private String BnkNo;

    /** 还款方式 */
    @JSONField(name = "RpymtMd")
    @NotNull(groups = {yed.class})
    @NotEmpty(groups = {yed.class})
    @Length(max = 32, groups = {yed.class})
    @DicType(dicType = NlsRpyMdEnum.class, method = "getValue", groups = {yed.class})
    private String RpymtMd;

    /** 还款周期 */
    @JSONField(name = "RpymtCyc")
    @NotNull(groups = {yed.class})
    @NotEmpty(groups = {yed.class})
    @Length(max = 4, groups = {yed.class})
    private String RpymtCyc;

    /** 还款周期单位代码 */
    @JSONField(name = "RpymtCycUnit")
    @NotNull(groups = {yed.class})
    @NotEmpty(groups = {yed.class})
    @Length(max = 10, groups = {yed.class})
    @DicType(dicType = NlsTrmTypeEnum.class, method = "getValue", groups = {yed.class})
    private String RpymtCycUnit;

    /** 渠道标志 */
    @JSONField(name = "ChanFlg")
    @NotNull(groups = {yed.class})
    @NotEmpty(groups = {yed.class})
    @Length(max = 7, groups = {yed.class})
    @DicType(dicType = SDicChannelType.class, method = "getValue", groups = {yed.class})
    private String ChanFlg;


    public String getUseCrdtAppSrlNo() {
        return UseCrdtAppSrlNo;
    }

    public void setUseCrdtAppSrlNo(String useCrdtAppSrlNo) {
        UseCrdtAppSrlNo = useCrdtAppSrlNo;
    }

    public String getCrAppSrlNo() {
        return CrAppSrlNo;
    }

    public void setCrAppSrlNo(String crAppSrlNo) {
        CrAppSrlNo = crAppSrlNo;
    }

    public String getPdCd() {
        return PdCd;
    }

    public void setPdCd(String pdCd) {
        PdCd = pdCd;
    }

    public String getLoanPdNm() {
        return LoanPdNm;
    }

    public void setLoanPdNm(String loanPdNm) {
        LoanPdNm = loanPdNm;
    }

    public Double getLoanAmt() {
        return LoanAmt;
    }

    public void setLoanAmt(Double loanAmt) {
        LoanAmt = loanAmt;
    }

    public String getLoanTrm() {
        return LoanTrm;
    }

    public void setLoanTrm(String loanTrm) {
        LoanTrm = loanTrm;
    }

    public String getLoanTrmTp() {
        return LoanTrmTp;
    }

    public void setLoanTrmTp(String loanTrmTp) {
        LoanTrmTp = loanTrmTp;
    }

    public String getLoanPps() {
        return LoanPps;
    }

    public void setLoanPps(String loanPps) {
        LoanPps = loanPps;
    }

    public String getCcy() {
        return Ccy;
    }

    public void setCcy(String ccy) {
        Ccy = ccy;
    }

    public Double getLoanIntRt() {
        return LoanIntRt;
    }

    public void setLoanIntRt(Double loanIntRt) {
        LoanIntRt = loanIntRt;
    }

    public String getLoanMatureDt() {
        return LoanMatureDt;
    }

    public void setLoanMatureDt(String loanMatureDt) {
        LoanMatureDt = loanMatureDt;
    }

    public String getLoanAppTm() {
        return LoanAppTm;
    }

    public void setLoanAppTm(String loanAppTm) {
        LoanAppTm = loanAppTm;
    }

    public String getBnkNm() {
        return BnkNm;
    }

    public void setBnkNm(String bnkNm) {
        BnkNm = bnkNm;
    }

    public String getDistrCardNo() {
        return DistrCardNo;
    }

    public void setDistrCardNo(String distrCardNo) {
        DistrCardNo = distrCardNo;
    }

    public String getRpymtCardNo() {
        return RpymtCardNo;
    }

    public void setRpymtCardNo(String rpymtCardNo) {
        RpymtCardNo = rpymtCardNo;
    }

    public String getBnkNo() {
        return BnkNo;
    }

    public void setBnkNo(String bnkNo) {
        BnkNo = bnkNo;
    }

    public String getRpymtMd() {
        return RpymtMd;
    }

    public void setRpymtMd(String rpymtMd) {
        RpymtMd = rpymtMd;
    }

    public String getRpymtCyc() {
        return RpymtCyc;
    }

    public void setRpymtCyc(String rpymtCyc) {
        RpymtCyc = rpymtCyc;
    }


    public String getChanFlg() {
        return ChanFlg;
    }

    public void setChanFlg(String chanFlg) {
        ChanFlg = chanFlg;
    }

    public String getIdentTp() {
        return IdentTp;
    }

    public void setIdentTp(String identTp) {
        IdentTp = identTp;
    }

    public String getIdentNo() {
        return IdentNo;
    }

    public void setIdentNo(String identNo) {
        IdentNo = identNo;
    }

    public String getRpymtCycUnit() {
        return RpymtCycUnit;
    }

    public void setRpymtCycUnit(String rpymtCycUnit) {
        RpymtCycUnit = rpymtCycUnit;
    }
}
